package com.example;
 
import org.example.spring.BeanPostProcessor;
import org.example.spring.annotation.Component;
 
/**
 * @version 1.0
 */
@Component
public class BeanPostProcessorImpl implements BeanPostProcessor {
 
    @Override
    public Object postProcessBeforeInitialization(Object bean, String beanName) {
        System.out.println(beanName + "初始化之前...");
 
        return bean;
    }
 
    @Override
    public Object postProcessAfterInitialization(Object bean, String beanName) {
        System.out.println(beanName + "初始化完成...");
 
        return bean;
    }
 
}